package cn.lopr.im.api.service;

import cn.lopr.im.api.bean.*;
import cn.lopr.im.api.vo.ArticleCommentVo;
import cn.lopr.im.api.vo.ArticleVo;
import com.github.pagehelper.PageInfo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author shuangyang7
 * @date 2021/5/19 22:15
 */
@Transactional
public interface IArticleService {
    List<ArticlePlate> getPlate();

    PageInfo<ArticleVo> getArticleList(User user, int page, int size, String plateID);

    PageInfo<ArticleVo> getArticleListByUserId(User user, int page, int size, String userId);

    ArticleVo getArticle(User user, String articleId);

    boolean addArticle(User user, Article article);

    boolean updateArticle(User user, Article article);

    boolean delArticle(User user, String articleId);

    List<ArticleCommentVo> getArticleComment(String articleId, int page, int size);

    List<ArticleCommentVo> getArticleChildCommentMultistage(String parentId, int page, int size);

    List<ArticleCommentVo> getArticleChildCommentSingle(String parentId, int page, int size);

    boolean addArticleComment(User user, ArticleComment articleComment);

    List<ArticleOption> getArticleLike(String articleID);

    List<ArticleOption> getArticleShare(String articleID);

}
